package com.lagou.dao;

import com.lagou.pojo.Course;
import com.lagou.pojo.Course_Lesson;
import com.lagou.pojo.Course_Section;

import java.util.List;

public interface CourseContentDao {

    /**
     * 根据课程id查询课程相关信息
     * @param courseId
     * @return
     */
    public List<Course_Section> findSectionAndLessonByCourseId(int courseId);

    /**
     * 根据章节 id, 查询课时相关信息
     * @param sectionId
     * @return
     */
    public List<Course_Lesson> findLessonBySectionId(int sectionId);

    public Course findCourseByCourseId(int courseId);

    public int saveSection(Course_Section section);

    public int updateSection(Course_Section section);

    public int updateSectionStatus(int id, int status);

    /**
     * 保存课时信息
     * @param lesson
     * @return
     */
    public int saveLesson(Course_Lesson lesson);

    /**
     * 修改课时信息
     * @param lesson
     * @return
     */
    public int updateLesson(Course_Lesson lesson);
}
